package net.diaowen.common.utils;

import net.diaowen.dwsurvey.service.SurveyAnswerManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by limeng on 7/2/2019.
 */


public class ExportReportThread  extends Thread  {


    SurveyAnswerManager surveyAnswerManager;

    String savePath;

    String surveyId;

    public SurveyAnswerManager getSurveyAnswerManager() {
        return surveyAnswerManager;
    }

    public void setSurveyAnswerManager(SurveyAnswerManager surveyAnswerManager) {
        this.surveyAnswerManager = surveyAnswerManager;
    }

    public String getSurveyId() {
        return surveyId;
    }

    public void setSurveyId(String surveyId) {
        this.surveyId = surveyId;
    }

    public String getSavePath() {
        return savePath;
    }

    public void setSavePath(String savePath) {
        this.savePath = savePath;
    }

    public void run() {

            System.out.println("Thread is runing...........");



            try {

                savePath=surveyAnswerManager.exportXLS(surveyId,savePath);

            } catch (Exception e) {

                e.printStackTrace();

            }

            System.out.println("Thread is end");





        }




}
